
function validatePickTwo() {

    console.log("hi ----- ");

    var first_word = document.forms["pickTwoForm"]["first_word"].value;
    var last_word = document.forms["pickTwoForm"]["last_word"].value;

    var pattern = /[a-zA-Z]+/;

    if (!pattern.test(last_word)) {
        document.getElementById('last_word_error').visible = true;
        document.getElementById('last_word_error').innerHTML = "Only Letters Please!";
        return false;
    } else {
        document.getElementById('last_word_error').visible = false;
    }
    
    if (!pattern.test(first_word)) {
        document.getElementById('first_word_error').visible = true;
        document.getElementById('first_word_error').innerHTML = "Only Letters Please!";
        return false;
    } else {
        document.getElementById('first_word_error').visible = false;
    }
        return true;
}
